home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
PET
/
S-Super PET
/
(s)t4.d64
/
FACT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
2009-01-18
|
277b
|
20 lines
program main( output );
var
n : integer;
function fact( n : integer ) : integer;
begin
if( n <= 1 )then
fact := 1
else
fact := n * fact( n-1 );
end;
begin
for n := 0 to 7 do
writeln( n:2, '! = ', fact( n ) );
end.